package com.igo;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.oas.annotations.EnableOpenApi;

//不需要在每个mapper接口上使用@Mapper注解,统一扫描mapper接口所在的包 - 由spring来构建其代理实现类对象

@MapperScan("com.igo.mapper")
@EnableTransactionManagement // 开启事务管理器,并且能够识别出@Transactional
@EnableAsync
@EnableScheduling
//@EnableAspectJAutoProxy(exposeProxy = true)
@SpringBootApplication
// 或者使用下面的注解，也是可以的
@EnableOpenApi
public class IgoApplication {

    public static void main(String[] args) {
        SpringApplication.run(IgoApplication.class, args);
    }

}
